import { i18n } from 'boot/i18n.js'
import { rackDirections } from 'src/views/CarrierCore/enum.js'
import { computed } from 'vue'

// 层级名称
export const layerNames = computed(() => {
  return {
    texts: i18n.t('MapCore.LayerNameTip1'), areas: i18n.t('MapCore.LayerNameTip2'),
    points: i18n.t('MapCore.LayerNameTip3'), arrows: i18n.t('MapCore.LayerNameTip4'),
    lines: i18n.t('MapCore.LayerNameTip5'), AMRs: i18n.t('MapCore.LayerNameTip6')
  }
})
// 地图站点属性：导航类型
export const NavigationTypes = computed(() => {
  return [{
    label: `${i18n.t('AGVCore.NavigationTypeTip1')}`, value: '0'
  }, {
    label: `${i18n.t('AGVCore.NavigationTypeTip3')}`, value: '1'
  }]
})
// 地图方向
export const mapDirections = computed(() => {
  return [{
    label: '0°', value: '0'
  }, {
    label: '90°', value: '1'
  }, {
    label: '-90°', value: '2'
  }, {
    label: '180°', value: '3'
  }]
})
// 地图站点属性：站点方向
export const stationDirections = computed(() => {
  return [{
    label: `${i18n.t('Misc.Any')}`, value: '999', color: 'blue-5'
  }, {
    label: '0°', value: '0'
  }, {
    label: '90°', value: '0'
  }, {
    label: `${i18n.t('CarrierCore.RackDirectionTip1')}`, value: '666'
  }, {
    label: `${i18n.t('CarrierCore.RackDirectionTip2')}`, value: '777'
  }]
})
// 地图站点属性：货架方向
export const formatRackDirections = computed(
  () => [{ label: `${i18n.t('CarrierCore.RackDirectionTip3')}`, value: '9', color: 'primary' },
    ...rackDirections.value])
// 地图站点属性：象限
export const Quadrants = computed(() => {
  return [{
    label: `${i18n.t('StationAttrs.QuadrantTip1')}`, value: '1'
  }, {
    label: `${i18n.t('StationAttrs.QuadrantTip2')}`, value: '2'
  }, {
    label: `${i18n.t('StationAttrs.QuadrantTip3')}`, value: '4'
  }, {
    label: `${i18n.t('StationAttrs.QuadrantTip4')}`, value: '8'
  }]
})
// 可避让
export const IsAvoidable = computed(() => {
  return [{
    label: `${i18n.t('StationAttrs.IsAvoidableTip1')}`, value: '0'
  }, {
    label: `${i18n.t('StationAttrs.IsAvoidableTip2')}`, value: '1'
  }, {
    label: `${i18n.t('StationAttrs.IsAvoidableTip3')}`, value: '2'
  }]
})
// 可旋转
export const IsRotatable = computed(() => {
  return [{
    label: `${i18n.t('StationAttrs.Rotatable')}`, value: '0'
  }, {
    label: `${i18n.t('StationAttrs.NonRotatable')}`, value: '1'
  }, {
    label: `${i18n.t('StationAttrs.FineAdjustment')}`, value: '2'
  }]
})